<?php
ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
require_once 'lib/RTFDocument.php';
$rtfdoc = new RTFDocument();
$font = new RTFFont();
$font->setFontFace('Arial', RTFFont::FACE_SWISS)->setSize(12)->setColor(new RTFColor(0, 0, 0));
$rtfdoc->addFont($font);
$rtfdoc->addColor(new RTFColor(255, 0, 0));
$rtfdoc->addColor(new RTFColor(255, 255, 0));
$body = new RTFBody('test [b]text[/b] enzo');
$body2 = new RTFBody('test[i]2!!!11[/i]one11!1!eleveneleven');
$rtfdoc->addBody($body);
$rtfdoc->addBody($body2);
$rtfdoc->write('test.rtf', true);
?>